package com.example.service.serviceImpl;

import com.example.domain.Record;
import com.example.mapper.RecordMapper;
import com.example.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class RecordServiceImpl implements RecordService {
    @Autowired
    RecordMapper recordMapper ;

    public List<Record> showAllRecord() {
        return recordMapper.showAllRecord();
    }

//    @Override
//    public Boolean addNewRecord(Integer rid, Integer uid, String optype, String optime) {
//        System.out.println("开始插入数据");
//        recordMapper.addNewRecord(rid,uid,optype,optime);
//        System.out.println("插入完成");
//        return true;
//    }
    @Override
    public Boolean addNewRecord(Record record) {
        recordMapper.addNewRecord(record);
        return true;
    }
}
